package com.xhwl.centiotdata.service;

import com.xhwl.common.dto.cent.iotdata.repair.RepairActionDTO;
import com.xhwl.common.enums.iot.RepairStepResultEnum;
import com.xhwl.common.pojo.cent.iot.RepairDetailLog;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Date;
import java.util.List;

/**
 * Copyright (C),1998-2022, 兴海物联
 * FileName: RepairDetailLogService
 * Author: XuChang
 * Date: 2022/5/27 11:02
 * Description: 操作详情
 * History:
 */
public interface RepairDetailLogService extends IService<RepairDetailLog> {

    /**
     * 根据查询条件，生成操作详情
     *
     * @param repairActionDTO 操作范围
     * @param repairId        操作id
     * @return 操作成功或者失败
     */
    List<Date> generateDetailLog(RepairActionDTO repairActionDTO, int repairId);


    /**
     * 获取操作详情
     *
     * @param operateId
     * @return
     */
    List<RepairDetailLog> getOperateDetail(int operateId);


    /**
     * 修改某一天的修复记录状态
     *
     * @param operateId
     * @param date
     * @param repairStepResultEnum
     * @param resultLog            请求结果
     * @param operateLog           操作结果
     * @return 是否修改成功
     */
    boolean updateStatus(int operateId, Date date, RepairStepResultEnum repairStepResultEnum, String resultLog, String operateLog);
}
